//
//  NSView+Screen.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/6/2.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

extension NSView {
    func enterFullScreen() {
        guard let screen = NSScreen.main else {
            return
        }
        if !self.isInFullScreenMode {
            self.enterFullScreenMode(screen, withOptions: [NSView.FullScreenModeOptionKey.fullScreenModeAllScreens : true])
        }
    }
    func exitFullScreen() {
        self.exitFullScreenMode(options: [NSView.FullScreenModeOptionKey.fullScreenModeAllScreens : true])
    }
}
